//**********************************************************************
//	Programmer	-	Sujal Bista
//	File Name	-	mathFunctions.h
//	Description	:	
//					basic data types
//
//**********************************************************************

#ifndef _MATH_FUNCTIONS_H_
#define _MATH_FUNCTIONS_H_

//compile only once
#pragma once

#include "global.h"

//computes bezier Weights
const float4 bezierWeights(float t);

//computes b-spline Weights
const float4 bSplineWeights(float t);

//computes Catmull Rom-spline Weights
const float4 catmullRomSplineWeights(float t);

//computes gaussian Weight
float computeGaussianWeight(const float2 &position,const float2 &center,const float &standardDeviationX,const float &standardDeviationY);
//computes gaussian kernel
float *computeGaussianKernel(unsigned int radius, float standardDeviationX, float standardDeviationY);

/////////////////////////////////////////////////////
//functions that effect float4x4S
/////////////////////////////////////////////////////

//computes area of a triangle
float area(const float3 &a,const float3 &b,const float3 &c);

//distance from point to line
float distance(const float3 &p0,const float3 &p1,const float3 &pos);
//distance from point to line
float distance(const float2 &p0,const float2 &p1,const float2 &pos);

#endif
